Contents | Index | < Browse | Browse >

LETTERdifftimeULETTER Computes the difference between two time_t values.

Overview
#include <time.h>

r = difftime(t1, t2);

double r; // result
time_t t1, t2; // values (as returned by time())

Portability
ANSI

Description
"difftime" subtracts the two times passed and returns the result in seconds as a double-precision floating-point number.

Returns
Returns the difference between two time_t values in seconds.

See also
asctime , ctime , gmtime , localtime , time